package com.chenyongjing.design.pattern.visitor.kpi;

/**
 * 访问者
 * @Author chen
 * @Date 2022/12/8 22:24
 */
public interface IVisitor {

    /**
     * 职责单一化
     * @param engineer
     */
    void visit(Engineer engineer);

    void visit(Manager manager);
}
/**
 * 如果人员种类增加，if判断就会剧增
 */
//public abstract class IVisitor {
//
//    void visit(Employee employee){
//        if (employee instanceof Manager){
//            System.out.println();
//        }else if (employee instanceof Engineer){
//
//        }
//    }
//}
